package com.longway.core.toolbox.wdp.msg;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.jfinal.kit.JsonKit;

/**
 * 消息模型
 * fastjson本身支持首字母大写的转换
 * Jackson采用注解的形式支持
 * 
 */
public class MsgModel {
    @JsonProperty("ToUserName")
    @XPath("//ToUserName")
    private String toUserName;
    @JsonProperty("FromUserName")
    @XPath("//FromUserName")
    private String fromUserName;
    @JsonProperty("CreateTime")
    @XPath("//CreateTime")
    private Long createTime;
    @JsonProperty("MsgType")
    @XPath("//MsgType")
    private String msgType;
    
    // 文本消息
    @JsonProperty("Content")
    @XPath("//Content")
    private String content;
    @JsonProperty("MsgId")
    @XPath("//MsgId")
    private Long msgId;
    
    // 图片消息
    @JsonProperty("PicUrl")
    @XPath("//PicUrl")
    private String picUrl;
    @JsonProperty("MediaId")
    @XPath("//MediaId")
    private String mediaId;
    
    // 事件消息
    @JsonProperty("Event")
    @XPath("//Event")
    private String event;
    @JsonProperty("SessionFrom")
    @XPath("//SessionFrom")
    private String sessionFrom;
    
    //第三方平台代码说审核结果事件消息
    @JsonProperty("SuccTime")
    @XPath("//SuccTime")
    private Long succTime;
    @JsonProperty("FailTime")
    @XPath("//FailTime")
    private Long failTime;
    @JsonProperty("DelayTime")
    @XPath("//DelayTime")
    private Long delayTime;
    @JsonProperty("Reason")
    @XPath("//Reason")
    private String reason;
    @JsonProperty("ScreenShot")
    @XPath("//ScreenShot")
    private String screenShot;
    
    
    //授权事件
    @JsonProperty("AppId")
    @XPath("//AppId")
    private String appId;
    @JsonProperty("InfoType")
    @XPath("//InfoType")
    private String infoType;
    @JsonProperty("ComponentVerifyTicket")
    @XPath("//ComponentVerifyTicket")
    private String ComponentVerifyTicket;
    
    public String getToUserName() {
        return toUserName;
    }
    public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Long getMsgId() {
		return msgId;
	}
	public void setMsgId(Long msgId) {
		this.msgId = msgId;
	}
	public String getPicUrl() {
		return picUrl;
	}
	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}
	public String getMediaId() {
		return mediaId;
	}
	public void setMediaId(String mediaId) {
		this.mediaId = mediaId;
	}
	public void setToUserName(String toUserName) {
        this.toUserName = toUserName;
    }
    public String getFromUserName() {
        return fromUserName;
    }
    public void setFromUserName(String fromUserName) {
        this.fromUserName = fromUserName;
    }
    public Long getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }
    public String getMsgType() {
        return msgType;
    }
    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }
    public String getEvent() {
        return event;
    }
    public void setEvent(String event) {
        this.event = event;
    }
    public Long getSuccTime() {
		return succTime;
	}
	public void setSuccTime(Long succTime) {
		this.succTime = succTime;
	}
	public Long getFailTime() {
		return failTime;
	}
	public void setFailTime(Long failTime) {
		this.failTime = failTime;
	}
	public Long getDelayTime() {
		return delayTime;
	}
	public void setDelayTime(Long delayTime) {
		this.delayTime = delayTime;
	}
	public String getReason() {
		return reason;
	}
	public void setReason(String reason) {
		this.reason = reason;
	}
	public String getScreenShot() {
		return screenShot;
	}
	public void setScreenShot(String screenShot) {
		this.screenShot = screenShot;
	}
	public String getSessionFrom() {
		return sessionFrom;
	}
	public void setSessionFrom(String sessionFrom) {
		this.sessionFrom = sessionFrom;
	}
	public String getAppId() {
		return appId;
	}
	public void setAppId(String appId) {
		this.appId = appId;
	}
	public String getInfoType() {
		return infoType;
	}
	public void setInfoType(String infoType) {
		this.infoType = infoType;
	}
	public String getComponentVerifyTicket() {
		return ComponentVerifyTicket;
	}
	public void setComponentVerifyTicket(String componentVerifyTicket) {
		ComponentVerifyTicket = componentVerifyTicket;
	}
	@Override
    public String toString() {
        return JsonKit.toJson(this);
    }
}
